home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GWMALLOC.ZIP;1 / GWMALLOC.TAR / gw_malloc / conf.h.in < prev    next >
Encoding:
Text File  |  1993-04-08  |  3.9 KB  |  137 lines

  1. /*
  2.  * machine configuration flags
  3.  *
  4.  * Copyright 1992 by Gray Watson and the Antaire Corporation
  5.  *
  6.  * This file is part of the malloc-debug package.
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library (see COPYING-LIB); if not, write to the
  20.  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  * The author of the program may be contacted at gray.watson@antaire.com
  23.  *
  24.  * $Id: conf.h.in,v 1.9 1993/04/06 04:24:30 gray Exp $
  25.  */
  26.  
  27. /*
  28.  ************************************************************************
  29.  * USER SETTINGS:
  30.  ************************************************************************
  31.  */
  32.  
  33. /*
  34.  * include the RCS ids in the .c files and the installed library
  35.  */
  36. #define INCLUDE_RCS_IDS 1
  37.  
  38. /*
  39.  * should we allow zero length allocations or should be registered as errors.
  40.  * WARNING: this has not been tested although some code does exist for it.
  41.  */
  42. #define ALLOW_ALLOC_ZERO_SIZE 0
  43.  
  44. /*
  45.  * should we allow realloc of a NULL pointer.  this is useful when you are
  46.  * extending an array in a loop and do not want to allocate it specially the
  47.  * first time.
  48.  */
  49. #define ALLOW_REALLOC_NULL 1
  50.  
  51. /*
  52.  ************************************************************************
  53.  * SPECIAL DEFINES:
  54.  ************************************************************************
  55.  */
  56.  
  57. /*
  58.  * (char *)sbrk(int incr) is the main system memory allocation routine.  this
  59.  * extends the program's data space by INCR bytes.
  60.  */
  61. #define HAVE_SBRK 0
  62.  
  63. /*
  64.  * does your heap grow up?  Hopefully it does because there is not too much
  65.  * support for growing-down heaps because I do not have a system to test it on.
  66.  */
  67. #define HEAP_GROWS_UP 1
  68.  
  69. /*
  70.  * the alignment value of all allocations in number of bits (i.e. 2 ^ X) for
  71.  * fence-post checking.  it needs to be a base 2 number and 3 (i.e. 2 ^ 3 == 8)
  72.  * should work.  2 bits may also work on i386/i486 systems (for instance) but
  73.  * some RISC boxes (sparc for instance) require certain memory to be base 8
  74.  * (stack frames, code, etc.).
  75.  *
  76.  * NOTE: larger the number the more memory will be wasted when fence-checking
  77.  * NOTE: this is not necessarily the smallest possible allocated memory chunk
  78.  */
  79. #define ALLOCATION_ALIGNMENT_IN_BITS 3
  80.  
  81. /*
  82.  ************************************************************************
  83.  * LIBRARY DEFINES:
  84.  ************************************************************************
  85.  */
  86.  
  87. /*
  88.  * the Malloc-Debug library provides its own versions of the following
  89.  * functions,  or knows how to work around their absence.
  90.  */
  91. #define HAVE_BCMP 0
  92. #define HAVE_BCOPY 0
  93.  
  94. #define HAVE_MEMCMP 0
  95. #define HAVE_MEMCPY 0
  96. #define HAVE_MEMSET 0
  97.  
  98. #define HAVE_INDEX 0
  99. #define HAVE_RINDEX 0
  100.  
  101. #define HAVE_STRCAT 0
  102. #define HAVE_STRCMP 0
  103. #define HAVE_STRLEN 0
  104. #define HAVE_STRTOK 0
  105.  
  106. /*
  107.  * the below functions are here to provide function argument checking only.
  108.  */
  109. #define HAVE_BZERO 0
  110.  
  111. #define HAVE_MEMCCPY 0
  112. #define HAVE_MEMCHR 0
  113.  
  114. #define HAVE_STRCHR 0
  115. #define HAVE_STRRCHR 0
  116. #define HAVE_STRCPY 0
  117. #define HAVE_STRNCPY 0
  118. #define HAVE_STRCASECMP 0
  119. #define HAVE_STRNCASECMP 0
  120. #define HAVE_STRSPN 0
  121. #define HAVE_STRCSPN 0
  122. #define HAVE_STRNCAT 0
  123. #define HAVE_STRNCMP 0
  124. #define HAVE_STRPBRK 0
  125. #define HAVE_STRSTR 0
  126.  
  127. /*
  128.  * some defines to standardize memory functions
  129.  */
  130. #if HAVE_BCMP == 0
  131. #define bcmp(s1, s2, len)    (void)memcmp((char *)(s1), (char *)(s2), (len))
  132. #endif
  133.  
  134. #if HAVE_BCOPY == 0
  135. #define bcopy(from, to, len)    (void)memcpy((char *)(to), (char *)(from), len)
  136. #endif
  137.